﻿<div class="alert alert-info">
    Provide user name, password and server location that you want to interact with
</div>
<div ng-show="error" class="alert alert-danger">{{error}}</div>
<form name="form" ng-submit="login()" role="form">
    <div class="form-group">
        <label for="username">Username</label>
        <i class="fa fa-key"></i>
        <input type="text" name="username" id="username" class="form-control" ng-model="username" required />
        <span ng-show="form.username.$dirty && form.username.$error.required" class="help-block">Username is required</span>
    </div>
    <div class="form-group">
        <label for="password">Password</label>
        <i class="fa fa-lock"></i>
        <input type="password" name="password" id="password" class="form-control" ng-model="password" required />
        <span ng-show="form.password.$dirty && form.password.$error.required" class="help-block">Password is required</span>
    </div>
    <div class="form-group">
        <label for="serverUrl">Server URL</label>
        <i class="fa fa-key"></i>
        <input type="text" name="serverUrl" id="serverUrl" class="form-control" ng-model="serverUrl" required />
        <span ng-show="form.serverUrl.$dirty && form.serverUrl.$error.required" class="help-block">Server URL is required</span>
    </div>
    <div class="form-actions">
        <button type="submit" ng-disabled="form.$invalid || dataLoading" class="btn btn-danger">Login</button>
        <img ng-if="dataLoading" src="" />
    </div>
</form>